<template>
  <div>

    <div style="height: 45px;border-radius: 4px;width: 1090px;background-color: white;box-shadow:#009BB3 0 0 5px;margin: 10px auto">
      <p style="font-size: 16px;font-weight: bolder;line-height: 45px;margin: 0 0 0 8px;color: #009BB3">疫情资讯</p>
    </div>

    <!-- 资讯信息-->


    <div  style="margin:auto ;width: 1090px;overflow: hidden;text-align: center" >
      <div v-for="info in informationArr">
        <a style="text-decoration: none" :href="'/home/newsDetail?id='+info.id">
          <div style="height: 197px;width: 272px; float:left">
            <img :src="'http://176.17.10.223:18082/'+info.img" style="width: 263px;height:163px" alt="">
            <span style="margin: 10px;color: #3f3f3f">{{info.title.slice(0,12) + '...'}}</span>
          </div>
        </a>

      </div>
    </div>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        informationArr:[],
      }
    },
    created() {
      this.getData();
    },
    methods: {
      getData(){
        this.user = JSON.parse(localStorage.getItem('user'))
        //获取所有资讯信息
        this.axios.post("http://176.17.10.223:18082/information/select-List").then( (response)=> {
          this.informationArr  = response.data.data;
        })
      },
    },
  }
</script>